Optimal. Leaf size=182 \[ \frac {b (3 a+b) \log (1-\sin (c+d x))}{16 (a+b)^3 d}-\frac {(3 a-b) b \log (1+\sin (c+d x))}{16 (a-b)^3 d}+\frac {a^3 b^2 \log (a+b \sin (c+d x))}{\left (a^2-b^2\right )^3 d}+\frac {\sec ^4(c+d x) (a-b \sin (c+d x))}{4 \left (a^2-b^2\right ) d}-\frac {\sec ^2(c+d x) \left (4 a^3-b \left (5 a^2-b^2\right ) \sin (c+d x)\right )}{8 \left (a^2-b^2\right )^2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.25, antiderivative size = 182, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 5, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.172, Rules used = {2916, 12, 1661,
837, 815} \begin {gather*} \frac {\sec ^4(c+d x) (a-b \sin (c+d x))}{4 d \left (a^2-b^2\right )}+\frac {a^3 b^2 \log (a+b \sin (c+d x))}{d \left (a^2-b^2\right )^3}-\frac {\sec ^2(c+d x) \left (4 a^3-b \left (5 a^2-b^2\right ) \sin (c+d x)\right )}{8 d \left (a^2-b^2\right )^2}+\frac {b (3 a+b) \log (1-\sin (c+d x))}{16 d (a+b)^3}-\frac {b (3 a-b) \log (\sin (c+d x)+1)}{16 d (a-b)^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 815
Rule 837
Rule 1661
Rule 2916
Rubi steps
\begin {align*} \int \frac {\sec ^2(c+d x) \tan ^3(c+d x)}{a+b \sin (c+d x)} \, dx &=\frac {b^5 \text {Subst}\left (\int \frac {x^3}{b^3 (a+x) \left (b^2-x^2\right )^3} \, dx,x,b \sin (c+d x)\right )}{d}\\ &=\frac {b^2 \text {Subst}\left (\int \frac {x^3}{(a+x) \left (b^2-x^2\right )^3} \, dx,x,b \sin (c+d x)\right )}{d}\\ &=\frac {\sec ^4(c+d x) (a-b \sin (c+d x))}{4 \left (a^2-b^2\right ) d}+\frac {\text {Subst}\left (\int \frac {\frac {a b^4}{a^2-b^2}-\frac {b^2 \left (4 a^2-b^2\right ) x}{a^2-b^2}}{(a+x) \left (b^2-x^2\right )^2} \, dx,x,b \sin (c+d x)\right )}{4 d}\\ &=\frac {\sec ^4(c+d x) (a-b \sin (c+d x))}{4 \left (a^2-b^2\right ) d}-\frac {\sec ^2(c+d x) \left (\frac {4 a^3}{a^2-b^2}-\frac {b \left (5 a^2-b^2\right ) \sin (c+d x)}{a^2-b^2}\right )}{8 \left (a^2-b^2\right ) d}-\frac {\text {Subst}\left (\int \frac {\frac {a b^4 \left (3 a^2+b^2\right )}{a^2-b^2}-\frac {b^4 \left (5 a^2-b^2\right ) x}{a^2-b^2}}{(a+x) \left (b^2-x^2\right )} \, dx,x,b \sin (c+d x)\right )}{8 b^2 \left (a^2-b^2\right ) d}\\ &=\frac {\sec ^4(c+d x) (a-b \sin (c+d x))}{4 \left (a^2-b^2\right ) d}-\frac {\sec ^2(c+d x) \left (\frac {4 a^3}{a^2-b^2}-\frac {b \left (5 a^2-b^2\right ) \sin (c+d x)}{a^2-b^2}\right )}{8 \left (a^2-b^2\right ) d}-\frac {\text {Subst}\left (\int \left (-\frac {b^3 (-a+b) (3 a+b)}{2 (a+b)^2 (b-x)}-\frac {8 a^3 b^4}{(a-b)^2 (a+b)^2 (a+x)}+\frac {(3 a-b) b^3 (a+b)}{2 (a-b)^2 (b+x)}\right ) \, dx,x,b \sin (c+d x)\right )}{8 b^2 \left (a^2-b^2\right ) d}\\ &=\frac {b (3 a+b) \log (1-\sin (c+d x))}{16 (a+b)^3 d}-\frac {(3 a-b) b \log (1+\sin (c+d x))}{16 (a-b)^3 d}+\frac {a^3 b^2 \log (a+b \sin (c+d x))}{\left (a^2-b^2\right )^3 d}+\frac {\sec ^4(c+d x) (a-b \sin (c+d x))}{4 \left (a^2-b^2\right ) d}-\frac {\sec ^2(c+d x) \left (\frac {4 a^3}{a^2-b^2}-\frac {b \left (5 a^2-b^2\right ) \sin (c+d x)}{a^2-b^2}\right )}{8 \left (a^2-b^2\right ) d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.84, size = 166, normalized size = 0.91 \begin {gather*} \frac {\frac {b (3 a+b) \log (1-\sin (c+d x))}{(a+b)^3}-\frac {(3 a-b) b \log (1+\sin (c+d x))}{(a-b)^3}+\frac {16 a^3 b^2 \log (a+b \sin (c+d x))}{(a-b)^3 (a+b)^3}+\frac {1}{(a+b) (-1+\sin (c+d x))^2}+\frac {3 a+b}{(a+b)^2 (-1+\sin (c+d x))}+\frac {1}{(a-b) (1+\sin (c+d x))^2}+\frac {-3 a+b}{(a-b)^2 (1+\sin (c+d x))}}{16 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.50, size = 176, normalized size = 0.97
method | result | size |
derivativedivides | \(\frac {\frac {a^{3} b^{2} \ln \left (a +b \sin \left (d x +c \right )\right )}{\left (a +b \right )^{3} \left (a -b \right )^{3}}+\frac {1}{2 \left (8 a -8 b \right ) \left (1+\sin \left (d x +c \right )\right )^{2}}-\frac {3 a -b}{16 \left (a -b \right )^{2} \left (1+\sin \left (d x +c \right )\right )}-\frac {\left (3 a -b \right ) b \ln \left (1+\sin \left (d x +c \right )\right )}{16 \left (a -b \right )^{3}}+\frac {1}{2 \left (8 a +8 b \right ) \left (\sin \left (d x +c \right )-1\right )^{2}}-\frac {-3 a -b}{16 \left (a +b \right )^{2} \left (\sin \left (d x +c \right )-1\right )}+\frac {\left (3 a +b \right ) b \ln \left (\sin \left (d x +c \right )-1\right )}{16 \left (a +b \right )^{3}}}{d}\) | \(176\) |
default | \(\frac {\frac {a^{3} b^{2} \ln \left (a +b \sin \left (d x +c \right )\right )}{\left (a +b \right )^{3} \left (a -b \right )^{3}}+\frac {1}{2 \left (8 a -8 b \right ) \left (1+\sin \left (d x +c \right )\right )^{2}}-\frac {3 a -b}{16 \left (a -b \right )^{2} \left (1+\sin \left (d x +c \right )\right )}-\frac {\left (3 a -b \right ) b \ln \left (1+\sin \left (d x +c \right )\right )}{16 \left (a -b \right )^{3}}+\frac {1}{2 \left (8 a +8 b \right ) \left (\sin \left (d x +c \right )-1\right )^{2}}-\frac {-3 a -b}{16 \left (a +b \right )^{2} \left (\sin \left (d x +c \right )-1\right )}+\frac {\left (3 a +b \right ) b \ln \left (\sin \left (d x +c \right )-1\right )}{16 \left (a +b \right )^{3}}}{d}\) | \(176\) |
norman | \(\frac {-\frac {2 a \,b^{2} \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d \left (a^{4}-2 a^{2} b^{2}+b^{4}\right )}-\frac {2 a \,b^{2} \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d \left (a^{4}-2 a^{2} b^{2}+b^{4}\right )}+\frac {4 a^{3} \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d \left (a^{4}-2 a^{2} b^{2}+b^{4}\right )}+\frac {b \left (3 a^{2}+b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 \left (a^{4}-2 a^{2} b^{2}+b^{4}\right ) d}+\frac {b \left (3 a^{2}+b^{2}\right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 \left (a^{4}-2 a^{2} b^{2}+b^{4}\right ) d}-\frac {\left (11 a^{2}-7 b^{2}\right ) b \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 \left (a^{4}-2 a^{2} b^{2}+b^{4}\right ) d}-\frac {\left (11 a^{2}-7 b^{2}\right ) b \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 \left (a^{4}-2 a^{2} b^{2}+b^{4}\right ) d}}{\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{4}}+\frac {a^{3} b^{2} \ln \left (a \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+2 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+a \right )}{d \left (a^{6}-3 a^{4} b^{2}+3 a^{2} b^{4}-b^{6}\right )}-\frac {\left (3 a -b \right ) b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{8 \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right ) d}+\frac {\left (3 a +b \right ) b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{8 \left (a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}\right ) d}\) | \(460\) |
risch | \(-\frac {3 i a b x}{8 \left (a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}\right )}-\frac {3 i a b c}{8 \left (a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}\right ) d}-\frac {i b^{2} x}{8 \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right )}-\frac {2 i a^{3} b^{2} x}{a^{6}-3 a^{4} b^{2}+3 a^{2} b^{4}-b^{6}}-\frac {i b^{2} c}{8 \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right ) d}-\frac {i b^{2} x}{8 \left (a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}\right )}+\frac {3 i a b x}{8 \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right )}-\frac {2 i a^{3} b^{2} c}{d \left (a^{6}-3 a^{4} b^{2}+3 a^{2} b^{4}-b^{6}\right )}-\frac {i b^{2} c}{8 \left (a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}\right ) d}+\frac {3 i a b c}{8 \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right ) d}+\frac {i \left (8 i a^{3} {\mathrm e}^{6 i \left (d x +c \right )}-5 a^{2} b \,{\mathrm e}^{7 i \left (d x +c \right )}+b^{3} {\mathrm e}^{7 i \left (d x +c \right )}+16 i b^{2} a \,{\mathrm e}^{4 i \left (d x +c \right )}+3 a^{2} b \,{\mathrm e}^{5 i \left (d x +c \right )}-7 b^{3} {\mathrm e}^{5 i \left (d x +c \right )}+8 i a^{3} {\mathrm e}^{2 i \left (d x +c \right )}-3 a^{2} b \,{\mathrm e}^{3 i \left (d x +c \right )}+7 b^{3} {\mathrm e}^{3 i \left (d x +c \right )}+5 a^{2} b \,{\mathrm e}^{i \left (d x +c \right )}-b^{3} {\mathrm e}^{i \left (d x +c \right )}\right )}{4 \left (a^{4}-2 a^{2} b^{2}+b^{4}\right ) \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{4} d}+\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) a b}{8 \left (a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}\right ) d}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) b^{2}}{8 \left (a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}\right ) d}-\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) a b}{8 \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right ) d}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) b^{2}}{8 \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right ) d}+\frac {a^{3} b^{2} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1+\frac {2 i a \,{\mathrm e}^{i \left (d x +c \right )}}{b}\right )}{d \left (a^{6}-3 a^{4} b^{2}+3 a^{2} b^{4}-b^{6}\right )}\) | \(752\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.29, size = 267, normalized size = 1.47 \begin {gather*} \frac {\frac {16 \, a^{3} b^{2} \log \left (b \sin \left (d x + c\right ) + a\right )}{a^{6} - 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} - b^{6}} - \frac {{\left (3 \, a b - b^{2}\right )} \log \left (\sin \left (d x + c\right ) + 1\right )}{a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}} + \frac {{\left (3 \, a b + b^{2}\right )} \log \left (\sin \left (d x + c\right ) - 1\right )}{a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}} + \frac {2 \, {\left (4 \, a^{3} \sin \left (d x + c\right )^{2} - {\left (5 \, a^{2} b - b^{3}\right )} \sin \left (d x + c\right )^{3} - 2 \, a^{3} - 2 \, a b^{2} + {\left (3 \, a^{2} b + b^{3}\right )} \sin \left (d x + c\right )\right )}}{{\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \sin \left (d x + c\right )^{4} + a^{4} - 2 \, a^{2} b^{2} + b^{4} - 2 \, {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \sin \left (d x + c\right )^{2}}}{16 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.47, size = 260, normalized size = 1.43 \begin {gather*} \frac {16 \, a^{3} b^{2} \cos \left (d x + c\right )^{4} \log \left (b \sin \left (d x + c\right ) + a\right ) - {\left (3 \, a^{4} b + 8 \, a^{3} b^{2} + 6 \, a^{2} b^{3} - b^{5}\right )} \cos \left (d x + c\right )^{4} \log \left (\sin \left (d x + c\right ) + 1\right ) + {\left (3 \, a^{4} b - 8 \, a^{3} b^{2} + 6 \, a^{2} b^{3} - b^{5}\right )} \cos \left (d x + c\right )^{4} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 4 \, a^{5} - 8 \, a^{3} b^{2} + 4 \, a b^{4} - 8 \, {\left (a^{5} - a^{3} b^{2}\right )} \cos \left (d x + c\right )^{2} - 2 \, {\left (2 \, a^{4} b - 4 \, a^{2} b^{3} + 2 \, b^{5} - {\left (5 \, a^{4} b - 6 \, a^{2} b^{3} + b^{5}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )}{16 \, {\left (a^{6} - 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} - b^{6}\right )} d \cos \left (d x + c\right )^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.52, size = 326, normalized size = 1.79 \begin {gather*} \frac {\frac {16 \, a^{3} b^{3} \log \left ({\left | b \sin \left (d x + c\right ) + a \right |}\right )}{a^{6} b - 3 \, a^{4} b^{3} + 3 \, a^{2} b^{5} - b^{7}} - \frac {{\left (3 \, a b - b^{2}\right )} \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right )}{a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}} + \frac {{\left (3 \, a b + b^{2}\right )} \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right )}{a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}} + \frac {2 \, {\left (6 \, a^{3} b^{2} \sin \left (d x + c\right )^{4} - 5 \, a^{4} b \sin \left (d x + c\right )^{3} + 6 \, a^{2} b^{3} \sin \left (d x + c\right )^{3} - b^{5} \sin \left (d x + c\right )^{3} + 4 \, a^{5} \sin \left (d x + c\right )^{2} - 16 \, a^{3} b^{2} \sin \left (d x + c\right )^{2} + 3 \, a^{4} b \sin \left (d x + c\right ) - 2 \, a^{2} b^{3} \sin \left (d x + c\right ) - b^{5} \sin \left (d x + c\right ) - 2 \, a^{5} + 6 \, a^{3} b^{2} + 2 \, a b^{4}\right )}}{{\left (a^{6} - 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} - b^{6}\right )} {\left (\sin \left (d x + c\right )^{2} - 1\right )}^{2}}}{16 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 12.45, size = 471, normalized size = 2.59 \begin {gather*} \frac {b\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )\,\left (3\,a+b\right )}{8\,d\,{\left (a+b\right )}^3}-\frac {\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (11\,a^2\,b-7\,b^3\right )}{4\,\left (a^4-2\,a^2\,b^2+b^4\right )}-\frac {4\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{a^4-2\,a^2\,b^2+b^4}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7\,\left (3\,a^2\,b+b^3\right )}{4\,\left (a^4-2\,a^2\,b^2+b^4\right )}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,\left (11\,a^2\,b-7\,b^3\right )}{4\,\left (a^4-2\,a^2\,b^2+b^4\right )}+\frac {2\,a\,b^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{a^4-2\,a^2\,b^2+b^4}+\frac {2\,a\,b^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6}{a^4-2\,a^2\,b^2+b^4}-\frac {b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (3\,a^2+b^2\right )}{4\,\left (a^4-2\,a^2\,b^2+b^4\right )}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}-\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1\right )\,\left (\frac {b^2}{4\,{\left (a-b\right )}^3}+\frac {3\,b}{8\,{\left (a-b\right )}^2}\right )}{d}+\frac {a^3\,b^2\,\ln \left (a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+a\right )}{d\,\left (a^6-3\,a^4\,b^2+3\,a^2\,b^4-b^6\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________